package com.liuhuxiang.product.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商品服务
 *
 * @author liuhuxiang
 * @version: StockController.java, 2023年02月27日 下午12:19 liuhuxiang  Exp $
 */
@RestController
@RequestMapping("/product")
public class ProductController {

    @Value("${server.port}")
    String port;

    @RequestMapping("/{id}")
    public String get(@PathVariable Integer id) throws InterruptedException {
        //Thread.sleep(4000);
        System.out.println("查询商品"+id);
        return "查询商品"+id+":"+port;
    }

}